From: Richard M. Stallman Date: Sat, 15 May 1993 18:47:18 +0000 (+0000) Subject: (transient-mark-mode): New command. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~96264 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=e23c2c217e05e88feb2e2c6da7d2387b34d0069b;p=emacs.git (transient-mark-mode): New command. --- diff --git a/lisp/simple.el b/lisp/simple.el index db499b4f5a4..b3a0870ea4c 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1289,6 +1289,18 @@ and it reactivates the mark." (set-mark (point)) (goto-char omark) nil)) + +(defun transient-mark-mode (arg) + "Toggle Transient Mark mode. +With arg, turn Transient Mark mode on if and only if arg is positive. + +In Transient Mark mode, changing the buffer \"deactivates\" the mark. +While the mark is active, the region is highlighted." + (interactive "P") + (setq transient-mark-mode + (if (null arg) + (not transient-mark-mode) + (> (prefix-numeric-value arg) 0)))) (defvar next-line-add-newlines t "*If non-nil, `next-line' inserts newline to avoid `end of buffer' error.")